package com.hopu.mall01.module;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Map;

/**
 * @Package: com.hopu.mall01.module
 * @ClassName: Oder
 * @Author: xiaoBao
 * @CreateTime: 2020/11/15 13:09
 * @Description: SpringBoot的依赖注入： 订单信息数据模型 测试
 */

@Component
@ConfigurationProperties(prefix = "oder")
public class Oder implements Serializable {
    /**订单Id*/
    private Integer oderId;
    /**订单名称*/
    private String oderName;
    /**购物车信息*/
    private Map<String,String> shoppingCar;


    /**生成Get/Set方法*/
    public Integer getOderId() {
        return oderId;
    }

    public void setOderId(Integer oderId) {
        this.oderId = oderId;
    }

    public String getOderName() {
        return oderName;
    }

    public void setOderName(String oderName) {
        this.oderName = oderName;
    }

    public Map<String, String> getShoppingCar() {
        return shoppingCar;
    }

    public void setShoppingCar(Map<String, String> shoppingCar) {
        this.shoppingCar = shoppingCar;
    }

    /**生成toString方法*/
    @Override
    public String toString() {
        return "Oder{" +
                "oderId=" + oderId +
                ", oderName='" + oderName + '\'' +
                ", shoppingCar=" + shoppingCar +
                '}';
    }
}
